package com.fitso.model.dao.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

import com.fitso.model.bean.journal.FoodJournal;

@Aspect
public class FoodJournalDataIntegrityAspect {
	@Before("execution(* com.fitso.model.dao.*.save(..)) && args(journal)")
	public void validateSaveOrUpdate(FoodJournal journal) {
	// Assert.notNull(journal, "journal is a required property");
	// Assert.notNull(journal.getUser(), "user is a required attribute");
	// Assert.notNull(journal.getEntries(), "entries is a required attribute");
	}

	@Before("execution(* com.fitso.model.dao.*.delete(..)) && args(journal)")
	public void validateDelete(FoodJournal journal) {
//		Assert.notNull(journal, "journal is a required parameter");
//		Assert.state(journal.getId() != null && journal.getId() >= 0, "journal id not valid or in a persistent state");
	}
}
